home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / PopupItem.h < prev    next >
C/C++ Source or Header  |  1992-06-10  |  2KB  |  68 lines

  1. #ifndef PopupItem_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define PopupItem_First
  7.  
  8. #include "Buttons.h"
  9.  
  10. class Menu;
  11.  
  12. //---- MenuButton --------------------------------------------------------------
  13.  
  14. class MenuButton: public StateButton {
  15. public:
  16.     MetaDef(MenuButton);
  17.     MenuButton(int id, Menu *m= 0);
  18.     ~MenuButton();
  19.     OStream& PrintOn(OStream&);
  20.     IStream& ReadFrom(IStream&);
  21.     void CollectParts(Collection*);
  22.     Menu *MyMenu();
  23.     void SetCollection(SeqCollection *col, bool freeold= TRUE);
  24.  
  25. protected:
  26.     Menu *menu;
  27. };
  28.  
  29. //---- PopupButton -------------------------------------------------------------
  30.  
  31. class PopupButton: public MenuButton {
  32. public:
  33.     MetaDef(PopupButton);
  34.     PopupButton(int id, int dfltid, class Menu *m= 0);
  35.     void SetContainer(VObject *v);
  36.     Metric GetMinSize();
  37.     void DoTrackMouse(TrackPhase atp, Point np);
  38.     void Draw(Rectangle r);
  39.     Command *DispatchEvents(Point lp, Token &t, Clipper *vf);
  40.     void Control(int id, int part, void *v);
  41. };
  42.  
  43. //---- PullDownButton ----------------------------------------------------------
  44.  
  45. class PullDownButton: public MenuButton {
  46. public:
  47.     MetaDef(PullDownButton);
  48.     PullDownButton(Menu *m= 0);
  49.     PullDownButton(int id, class Menu*);
  50.     void DoTrackMouse(TrackPhase atp, Point p);
  51.     void DrawHighlight(Rectangle r);
  52. };
  53.  
  54. //---- MenuItem ----------------------------------------------------------------
  55.  
  56. class MenuItem : public MenuButton {
  57.     short lastxpos, enterxpos;
  58. public:
  59.     MetaDef(MenuItem);
  60.     MenuItem(int id= cIdNone, VObject *v= 0, Menu *nm= 0);
  61.     void DoTrackMouse(TrackPhase, Point);
  62.     void DrawInner(Rectangle, bool);
  63.     void SetOrigin(Point at);
  64.     Metric GetMinSize();
  65. };
  66.  
  67. #endif
  68.